Create User
This endpoint allows you to create a new user for a business using an HTTP POST
request. It requires API key
and email
for authentication and accepts team details in a JSON request body.
API Endpoint
api/v1/business/user?apikey=<API KEY>&email=<EMAIL ID>
Request Syntax
POST api/v1/business/user?apikey=<API KEY>&email=<EMAIL ID>
Request Body
{
"phoneNumber": "9901425378",
"firstName": "Vinay",
"lastName": "Kumar",
"role": "AGENT",
"emailId": "vinay@lyricslrc.com",
"temporaryPassword": "Pass@1234",
"supervisorId": "a599237d-b12c-4b25-b43c",
"branchId": "34567890"
}
- Content-Type:
- application/x-www-form-urlencoded (form-data)
- Parameters:
- email: Caller’s EMAIL
- apikey: API KEY
Properties
Placeholder | Type | Required | Description |
---|---|---|---|
PhoneNumber | string | Yes | Phone number for calling operations |
firstName | string | Yes | User first name |
lastName | string | No | User last name |
role | string | Yes | Role to be assigned such as BUSINESS_ADMIN , MANAGER , AGENT , BRANCH_ADMIN |
emailId | string | Yes | Email address of the user |
temporaryPassword | string | No | Temporary password for the user |
supervisorId | string | No | Supervisor Id to be assigned for the user |
branchId | string | No | Branch Id of the user |
Example
Sample Request
curl --location 'https://alb-backend.msgkart.com/api/v1/business/user?apikey=<API KEY>&email=<EMAIL ID>' \
--header 'Content-Type: application/json' \
--data-raw '{
"phoneNumber": "9901425378",
"firstName": "Vinay",
"lastName": "kumar",
"role": "AGENT",
"emailId": "vinay@lyricslrc.com",
"temporaryPassword": "Pass@1234",
"supervisorId": "a599947d-bc5c-4b45-b93c",
"branchId": "34567890"
}'
Response
- HTTP Status Code: 200 OK (successful), 4xx/5xx (error)
- Response Body: JSON object containing user status details.
Error Handling
- Invalid credentials: 401 Unauthorized
- Missing/invalid parameters: 400 Bad Request
- Internal server error: 500 Internal Server Error